﻿using System;
using System.CodeDom.Compiler;
using System.Reflection;
using System.Runtime.CompilerServices;
using Prism.Mvvm;
using Syncfusion.ListView.XForms;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Xaml;
using Xamarin.Forms.Xaml.Internals;

namespace AutoR.Views.Home
{
	// Token: 0x02000035 RID: 53
	[XamlFilePath("Views\\Home\\EquipmentList.xaml")]
	public class EquipmentList : ContentPage
	{
		// Token: 0x060000C1 RID: 193 RVA: 0x0002CF50 File Offset: 0x0002B150
		public EquipmentList()
		{
			this.InitializeComponent();
		}

		// Token: 0x060000C2 RID: 194 RVA: 0x0002CF60 File Offset: 0x0002B160
		[GeneratedCode("Xamarin.Forms.Build.Tasks.XamlG", "0.0.0.0")]
		private void InitializeComponent()
		{
			if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(EquipmentList).GetTypeInfo().Assembly.GetName(), "Views/Home/EquipmentList.xaml") != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
			{
				this.__InitComponentRuntime();
				return;
			}
			BindingExtension bindingExtension = new BindingExtension();
			GridLayout gridLayout = new GridLayout();
			DataTemplate dataTemplate = new DataTemplate();
			SfListView sfListView = new SfListView();
			NameScope value = new NameScope();
			NameScope.SetNameScope(this, value);
			this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
			this.SetValue(Page.TitleProperty, "装备查询");
			bindingExtension.Path = "Equip";
			BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
			sfListView.SetBinding(SfListView.ItemsSourceProperty, binding);
			sfListView.SetValue(SfListView.AutoFitModeProperty, AutoFitMode.Height);
			sfListView.SetValue(SfListView.SelectionModeProperty, SelectionMode.None);
			gridLayout.SetValue(GridLayout.SpanCountProperty, 6);
			sfListView.SetValue(SfListView.LayoutManagerProperty, gridLayout);
			IDataTemplate dataTemplate2 = dataTemplate;
			EquipmentList.<InitializeComponent>_anonXamlCDataTemplate_7 <InitializeComponent>_anonXamlCDataTemplate_ = new EquipmentList.<InitializeComponent>_anonXamlCDataTemplate_7();
			object[] array = new object[0 + 3];
			array[0] = dataTemplate;
			array[1] = sfListView;
			array[2] = this;
			<InitializeComponent>_anonXamlCDataTemplate_.parentValues = array;
			<InitializeComponent>_anonXamlCDataTemplate_.root = this;
			dataTemplate2.LoadTemplate = new Func<object>(<InitializeComponent>_anonXamlCDataTemplate_.LoadDataTemplate);
			sfListView.SetValue(SfListView.ItemTemplateProperty, dataTemplate);
			this.SetValue(ContentPage.ContentProperty, sfListView);
		}

		// Token: 0x060000C3 RID: 195 RVA: 0x0002D0CD File Offset: 0x0002B2CD
		private void __InitComponentRuntime()
		{
			this.LoadFromXaml(typeof(EquipmentList));
		}

		// Token: 0x02000036 RID: 54
		[CompilerGenerated]
		private sealed class <InitializeComponent>_anonXamlCDataTemplate_7
		{
			// Token: 0x060000C5 RID: 197 RVA: 0x0002D0F4 File Offset: 0x0002B2F4
			internal object LoadDataTemplate()
			{
				BindingExtension bindingExtension = new BindingExtension();
				Image image = new Image();
				BindingExtension bindingExtension2 = new BindingExtension();
				Label label = new Label();
				AbsoluteLayout absoluteLayout = new AbsoluteLayout();
				BindingExtension bindingExtension3 = new BindingExtension();
				Label label2 = new Label();
				BindingExtension bindingExtension4 = new BindingExtension();
				Label label3 = new Label();
				StackLayout stackLayout = new StackLayout();
				Frame frame = new Frame();
				NameScope nameScope = new NameScope();
				NameScope.SetNameScope(frame, nameScope);
				frame.SetValue(View.MarginProperty, new Thickness(1.0));
				frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(1.0));
				stackLayout.SetValue(StackLayout.SpacingProperty, 0.0);
				absoluteLayout.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
				absoluteLayout.SetValue(VisualElement.WidthRequestProperty, 48.0);
				absoluteLayout.SetValue(VisualElement.HeightRequestProperty, 48.0);
				bindingExtension.Path = "Image";
				BindingBase binding = ((IMarkupExtension<BindingBase>)bindingExtension).ProvideValue(null);
				image.SetBinding(Image.SourceProperty, binding);
				image.SetValue(VisualElement.WidthRequestProperty, 48.0);
				image.SetValue(VisualElement.HeightRequestProperty, 48.0);
				absoluteLayout.Children.Add(image);
				bindingExtension2.Path = "num";
				BindingBase binding2 = ((IMarkupExtension<BindingBase>)bindingExtension2).ProvideValue(null);
				label.SetBinding(Label.TextProperty, binding2);
				label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.EndAndExpand);
				label.SetValue(View.VerticalOptionsProperty, LayoutOptions.EndAndExpand);
				label.SetValue(Label.TextColorProperty, Color.White);
				label.SetValue(VisualElement.BackgroundColorProperty, Color.Gray);
				BindableObject bindableObject = label;
				BindableProperty fontSizeProperty = Label.FontSizeProperty;
				IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
				string value = "10";
				XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
				Type typeFromHandle = typeof(IProvideValueTarget);
				int length;
				object[] array = new object[(length = this.parentValues.Length) + 4];
				Array.Copy(this.parentValues, 0, array, 4, length);
				object[] array2 = array;
				array2[0] = label;
				array2[1] = absoluteLayout;
				array2[2] = stackLayout;
				array2[3] = frame;
				object service;
				xamlServiceProvider.Add(typeFromHandle, service = new SimpleValueTargetProvider(array2, Label.FontSizeProperty, nameScope));
				xamlServiceProvider.Add(typeof(IReferenceProvider), service);
				Type typeFromHandle2 = typeof(IXamlTypeResolver);
				XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();
				xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
				xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
				xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
				xmlNamespaceResolver.Add("syncfusion", "clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms");
				xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(EquipmentList.<InitializeComponent>_anonXamlCDataTemplate_7).GetTypeInfo().Assembly));
				xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(19, 36)));
				bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
				label.SetValue(AbsoluteLayout.LayoutBoundsProperty, new Rectangle(0.0, 0.0, 0.95, 0.95));
				label.SetValue(AbsoluteLayout.LayoutFlagsProperty, AbsoluteLayoutFlags.SizeProportional);
				absoluteLayout.Children.Add(label);
				stackLayout.Children.Add(absoluteLayout);
				bindingExtension3.Path = "Name";
				BindingBase binding3 = ((IMarkupExtension<BindingBase>)bindingExtension3).ProvideValue(null);
				label2.SetBinding(Label.TextProperty, binding3);
				label2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
				label2.SetValue(Label.LineBreakModeProperty, LineBreakMode.NoWrap);
				BindableObject bindableObject2 = label2;
				BindableProperty fontSizeProperty2 = Label.FontSizeProperty;
				IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
				string value2 = "8";
				XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
				Type typeFromHandle3 = typeof(IProvideValueTarget);
				int length2;
				object[] array3 = new object[(length2 = this.parentValues.Length) + 3];
				Array.Copy(this.parentValues, 0, array3, 3, length2);
				object[] array4 = array3;
				array4[0] = label2;
				array4[1] = stackLayout;
				array4[2] = frame;
				object service2;
				xamlServiceProvider2.Add(typeFromHandle3, service2 = new SimpleValueTargetProvider(array4, Label.FontSizeProperty, nameScope));
				xamlServiceProvider2.Add(typeof(IReferenceProvider), service2);
				Type typeFromHandle4 = typeof(IXamlTypeResolver);
				XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();
				xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
				xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
				xmlNamespaceResolver2.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
				xmlNamespaceResolver2.Add("syncfusion", "clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms");
				xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(EquipmentList.<InitializeComponent>_anonXamlCDataTemplate_7).GetTypeInfo().Assembly));
				xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(21, 109)));
				bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
				stackLayout.Children.Add(label2);
				bindingExtension4.Path = "ShipEquips.Count";
				bindingExtension4.StringFormat = "装备: {0}";
				BindingBase binding4 = ((IMarkupExtension<BindingBase>)bindingExtension4).ProvideValue(null);
				label3.SetBinding(Label.TextProperty, binding4);
				label3.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
				BindableObject bindableObject3 = label3;
				BindableProperty fontSizeProperty3 = Label.FontSizeProperty;
				IExtendedTypeConverter extendedTypeConverter3 = new FontSizeConverter();
				string value3 = "10";
				XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
				Type typeFromHandle5 = typeof(IProvideValueTarget);
				int length3;
				object[] array5 = new object[(length3 = this.parentValues.Length) + 3];
				Array.Copy(this.parentValues, 0, array5, 3, length3);
				object[] array6 = array5;
				array6[0] = label3;
				array6[1] = stackLayout;
				array6[2] = frame;
				object service3;
				xamlServiceProvider3.Add(typeFromHandle5, service3 = new SimpleValueTargetProvider(array6, Label.FontSizeProperty, nameScope));
				xamlServiceProvider3.Add(typeof(IReferenceProvider), service3);
				Type typeFromHandle6 = typeof(IXamlTypeResolver);
				XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();
				xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
				xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
				xmlNamespaceResolver3.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
				xmlNamespaceResolver3.Add("syncfusion", "clr-namespace:Syncfusion.ListView.XForms;assembly=Syncfusion.SfListView.XForms");
				xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(EquipmentList.<InitializeComponent>_anonXamlCDataTemplate_7).GetTypeInfo().Assembly));
				xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(22, 122)));
				bindableObject3.SetValue(fontSizeProperty3, extendedTypeConverter3.ConvertFromInvariantString(value3, xamlServiceProvider3));
				stackLayout.Children.Add(label3);
				frame.SetValue(ContentView.ContentProperty, stackLayout);
				return frame;
			}

			// Token: 0x0400006B RID: 107
			internal object[] parentValues;

			// Token: 0x0400006C RID: 108
			internal EquipmentList root;
		}
	}
}
